﻿# -*- coding:utf-8 -*-
# Django settings for ktit project.
from django.conf import global_settings 

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

DATABASES = {
    'default': {
        'NAME': 'ktit',
        'ENGINE': 'django.db.backends.mysql',
        'USER': 'www',
        'PASSWORD': '321654'
        }
    } 

# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# although not all variations may be possible on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'Europe/Moscow'

# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15 'en-us'
LANGUAGE_CODE = 'ru'

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = 'D:/srv/www/django/ktit/media'

# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"   'http://localhost/media/'
MEDIA_URL = '/media/'

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/adminmedia/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = '*@6&*$(7p-@(m%9m7u)45o#q2ox2_4hlic5c!*s&$sjr)4-05('

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    #'django.middleware.doc.XViewMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
)

ROOT_URLCONF = 'ktit.urls'

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.debug',
    'django.contrib.messages.context_processors.messages',                           
    'index.context_processors.global_menu',) + global_settings.TEMPLATE_CONTEXT_PROCESSORS

INTERNAL_IPS = '127.0.0.1'

TEMPLATE_DIRS = (
    "D:/srv/www/django/ktit/templates",
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'django.contrib.messages',
    'shm',
    'ktit.task',   
    'ktit.expdev',
    'sklad',
    'index',
    'userprofile',
    'comp', 
)

#
SESSION_SAVE_EVERY_REQUEST = True 

#
#FILE_UPLOAD_HANDLERS = ('soft.UploadProgressCachedHandler',) + global_settings.FILE_UPLOAD_HANDLERS
#('D:/srv/www/django/ktit/UploadProgressCachedHandler.py', )

#The URL where requests are redirected after login when the contrib.auth.login view gets no next parameter.
LOGIN_REDIRECT_URL = '/'

#The URL where requests are redirected for login, specially when using the @login_required decorator.
LOGIN_URL = '/login/'

#LOGIN_URL counterpart.
#LOGOUT_URL
